<?php
namespace plugin\banmichaoqiangbizhi\model;

use think\Model;
 
class PluginBanmiBanmichaoqiangbizhiList extends Model
{
      public function finds($map,$field)
     {
        $finds = PluginBanmiBanmichaoqiangbizhiList::where($map)->field($field)->find(); 
         return $finds;
     }
      public function paginate($map,$field)
     {
  
      $list = PluginBanmiBanmichaoqiangbizhiList::where($map)->order('id', 'desc')->field($field)->paginate(20);
      $list = $list->all();
      $total = PluginBanmiBanmichaoqiangbizhiList::where($map)->count();
      $data['list']=$list;
      $data['total']=$total;
      return $data; 
     }
      public function adds($request,$field)
     { 
         $user = new PluginBanmiBanmichaoqiangbizhiList;
 
         return $user->save($request);
     }
 
     public function updates($map,$request,$field)
     { 
      $user = PluginBanmiBanmichaoqiangbizhiList::where($map)->find();  
    
      return $user->save($request);   
      
      
      
     }
      
       public function dels($map)
     {
      return PluginBanmiBanmichaoqiangbizhiList::where($map)->delete();
     }
     //模型方法


}